import { request } from "@/api/request";

//#region 经手人
export const getInfoBasePersonListApi =  (data:any)=>{
    return request({
        method:"GET",
        url:`/api/erpInfoBasePerson/list`,
        data:data
    })
}

export const addInfoBasePersonApi =  (data:any)=>{
    return request({
        method:"POST",
        url:`/api/erpInfoBasePerson/add`,
        data:data
    })
}

export const deleteInfoBasePersonApi =  (data:any)=>{
    return request({
        method:"DELETE",
        url:`/api/erpInfoBasePerson/delete`,
        data:data
    })
}

export const updateInfoBasePersonApi =  (data:any)=>{
    return request({
        method:"PUT",
        url:`/api/erpInfoBasePerson/update`,
        data:data
    })
}

//#endregion


//#region 结算账户
export const getInfoBaseAccountListApi =  (data:any)=>{
    return request({
        method:"GET",
        url:`/api/erpInfoBaseAccount/list`,
        data:data
    })
}

export const addInfoBaseAccountApi =  (data:any)=>{
    return request({
        method:"POST",
        url:`/api/erpInfoBaseAccount/add`,
        data:data
    })
}

export const deleteInfoBaseAccountApi =  (data:any)=>{
    return request({
        method:"DELETE",
        url:`/api/erpInfoBaseAccount/delete`,
        data:data
    })
}

export const updateInfoBaseAccountApi =  (data:any)=>{
    return request({
        method:"PUT",
        url:`/api/erpInfoBaseAccount/update`,
        data:data
    })
}

export const updateAccountDefaultApi =  (data:any)=>{
    return request({
        method:"POST",
        url:`/api/erpInfoBaseAccount/updateIsDefault`,
        data:data
    })
}
//#endregion

//#region 收支项目
export const getInfoBaseInOutItemListApi =  (data:any)=>{
    return request({
        method:"GET",
        url:`/api/erpInfoBaseInOutItem/list`,
        data:data
    })
}

export const addInfoBaseInOutItemApi =  (data:any)=>{
    return request({
        method:"POST",
        url:`/api/erpInfoBaseInOutItem/add`,
        data:data
    })
}

export const deleteInfoBaseInOutItemApi =  (data:any)=>{
    return request({
        method:"DELETE",
        url:`/api/erpInfoBaseInOutItem/delete`,
        data:data
    })
}

export const updateInfoBaseInOutItemApi =  (data:any)=>{
    return request({
        method:"PUT",
        url:`/api/erpInfoBaseInOutItem/update`,
        data:data
    })
}
//#endregion

//#region 仓库
export const getInfoBaseDepotListApi =  (data:any)=>{
    return request({
        method:"GET",
        url:`/api/erpInfoBaseDepot/list`,
        data:data
    })
}

export const addInfoBaseDepotApi =  (data:any)=>{
    return request({
        method:"POST",
        url:`/api/erpInfoBaseDepot/add`,
        data:data
    })
}

export const deleteInfoBaseDepotApi =  (data:any)=>{
    return request({
        method:"DELETE",
        url:`/api/erpInfoBaseDepot/delete`,
        data:data
    })
}

export const updateInfoBaseDepotApi =  (data:any)=>{
    return request({
        method:"PUT",
        url:`/api/erpInfoBaseDepot/update`,
        data:data
    })
}

export const updateInfoBaseDefaultApi =  (data:any)=>{
    return request({
        method:"POST",
        url:`/api/erpInfoBaseDepot/updateIsDefault`,
        data:data
    })
}
//#endregion

//#region 会员信息
export const getInfoBaseSupplierListApi =  (data:any)=>{
    return request({
        method:"GET",
        url:`/api/erpInfoBaseSupplier/list`,
        data
    })
}
export const addInfoBaseSupplierApi =  (data:any)=>{
    return request({
        method:"POST",
        url:`/api/erpInfoBaseSupplier/add`,
        data
    })
}
export const updateInfoBaseSupplierApi =  (data:any)=>{
    return request({
        method:"PUT",
        url:`/api/erpInfoBaseSupplier/update`,
        data
    })
}
export const deleteInfoBaseSupplierApi =  (data:any)=>{
    return request({
        method:"DELETE",
        url:`/api/erpInfoBaseSupplier/delete`,
        data
    })
}
//#endregion